<div class="col_box col_two" id="postmulti" style="width:550px;padding-right:0;">
    <form class="validform" method="post" action="/bill/multi/">
        <?php for ($i = 1; $i <= 3; $i++) { ?>
            <div class="col_multi">
                <dl class="billtype">
                    <dt>类型：</dt>
                    <dd>
                        <select name="row[<?= $i ?>][type]" class="type select" datatype="*" nullmsg=" ">
                            <?php foreach (get_bill_type() as $m => $n) { ?>
                                <option value="<?= $m ?>"><?= $n ?></option>
                            <?php } ?>
                        </select>
                    </dd>
                </dl>
                <!--支出-->
                <div class="m_hide m_expense" style="display:block;">
                    <dl><dt>时间：</dt>
                        <dd><input type="text" name="row[<?= $i ?>][expense][occurtime]" id="expense_datepicker<?= $i ?>" class="input datepicker" value="<?= date("Y-m-d") ?>" title="点击选择日期" size="10" style="width:100px;" datatype="date" readonly="true" errormsg=" " autocomplete="off" /></dd>
                    </dl>
                    <dl><dt>类别：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][expense][category_id]" class="select" datatype="*" nullmsg=" ">
                                <?= get_category_option_full('expense'); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>账户：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][expense][account_id]" class="select" datatype="*" nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>金额：</dt><dd><input type="text" name="row[<?= $i ?>][expense][amount]" id="expense_calculator<?= $i ?>" class="input calculator" size="10" maxlength="8" datatype="dec1" nullmsg=" " errormsg=" " /></dd></dl>
                    <dl><dt>说明：</dt><dd><textarea name="row[<?= $i ?>][expense][memo]" cols="30" rows="4" class="textarea"></textarea></dd></dl>
                    <dl><dd>
                            <input type="checkbox" name="row[<?= $i ?>][expense][notinfamily]" id="c_notinfamily_expense<?= $i ?>" value="1" class="checkbox" /> <label for="c_notinfamily_expense<?= $i ?>">不在家庭中显示</label>
                        </dd>
                    </dl>
                </div>
                <!--收入-->
                <div class="m_hide m_income">
                    <dl><dt>时间：</dt><dd><input type="text" name="row[<?= $i ?>][income][occurtime]" id="income_datepicker<?= $i ?>" class="input datepicker" value="<?= date("Y-m-d") ?>" title="点击选择日期" size="10" style="width:100px;" datatype="*" readonly="true" errormsg=" " autocomplete="off" /></dd></dl>
                    <dl><dt>类别：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][income][category_id]" class="select" datatype="*" nullmsg=" ">
                                <?= get_category_option_full('income'); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>账户：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][income][account_id]" class="select" datatype="*" nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>金额：</dt><dd><input type="text" name="row[<?= $i ?>][income][amount]" id="income_calculator<?= $i ?>" class="input calculator" size="5" maxlength="8" datatype="dec1" nullmsg=" " errormsg=" " /></dd></dl>
                    <dl><dt>说明：</dt><dd><textarea name="row[<?= $i ?>][income][memo]" cols="30" rows="4" class="textarea"></textarea></dd></dl>
                    <dl><dd><input type="checkbox" name="row[<?= $i ?>][income][notinfamily]" value="1" id="c_notinfamily_income<?= $i ?>" class="checkbox" /> <label for="c_notinfamily_income<?= $i ?>">不在家庭中显示</label></dd></dl>
                </div>
                <!--转账-->
                <div class="m_hide m_transfer">
                    <dl><dt>时间：</dt><dd><input type="text" name="row[<?= $i ?>][transfer][occurtime]" id="transfer_datepicker<?= $i ?>" class="input datepicker" value="<?= date("Y-m-d") ?>" title="点击选择日期" size="10" style="width:100px;" datatype="*" readonly="true" errormsg=" " autocomplete="off" /></dd></dl>
                    <dl><dt>转出：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][transfer][account_id]" id="account_id_transfer<?= $i ?>" datatype="*,notequal" notequal="inaccount_id_transfer<?= $i ?>" class="select" errormsg=" " nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>转入：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][transfer][inaccount_id]" id="inaccount_id_transfer<?= $i ?>" datatype="*,notequal" notequal="account_id_transfer<?= $i ?>" class="select" errormsg=" " nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>金额：</dt><dd><input type="text" name="row[<?= $i ?>][transfer][amount]" id="transfer_calculator<?= $i ?>" class="input calculator" size="5" maxlength="8" datatype="dec1" nullmsg=" " errormsg=" " /></dd></dl>
                    <dl><dt>说明：</dt><dd><textarea name="row[<?= $i ?>][transfer][memo]" cols="30" rows="4" class="textarea"></textarea></dd></dl>
                    <dl><dd><input type="checkbox" name="row[<?= $i ?>][transfer][notinfamily]" value="1" id="c_notinfamily_transfer<?= $i ?>" class="checkbox" /> <label for="c_notinfamily_transfer<?= $i ?>">不在家庭中显示</label></dd></dl>
                </div>
                <!--借款报销-->
                <div class="m_hide m_borrow">
                    <dl><dt>时间：</dt><dd><input type="text" name="row[<?= $i ?>][borrow][occurtime]" id="borrow_datepicker<?= $i ?>" class="input datepicker" value="<?= date("Y-m-d") ?>" title="点击选择日期" size="10" style="width:100px;" datatype="*" readonly="true" errormsg="昵称至少6个字符,最多18个字符！" autocomplete="off" /></dd></dl>
                    <dl><dt>类别：</dt><dd>
                            <input type="radio" name="row[<?= $i ?>][borrow][category_id]" class="radio" id="c_borrowout<?= $i ?>" value="1" checked /> <label for="c_borrowout<?= $i ?>">借出</label>
                            <input type="radio" name="row[<?= $i ?>][borrow][category_id]" class="radio" id="c_borrowin<?= $i ?>" value="2" /> <label for="c_borrowin<?= $i ?>">借入</label>
                        </dd></dl>
                    <dl><dt>账户：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][borrow][account_id]" class="select" datatype="*" nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>金额：</dt><dd><input type="text" name="row[<?= $i ?>][borrow][amount]" id="borrow_calculator<?= $i ?>" class="input calculator" size="5" maxlength="8" datatype="dec1" nullmsg=" " errormsg=" " /></dd></dl>
                    <dl><dt>说明：</dt><dd><textarea name="row[<?= $i ?>][borrow][memo]" cols="30" rows="4" class="textarea" datatype="*" nullmsg=" "></textarea></dd></dl>
                    <dl><dd><input type="checkbox" name="row[<?= $i ?>][borrow][notinfamily]" value="1" id="c_notinfamily_borrow<?= $i ?>" class="checkbox" /> <label for="c_notinfamily_borrow<?= $i ?>">不在家庭中显示</label></dd></dl>
                </div>
                <!--信用卡还款-->
                <div class="m_hide m_credit">
                    <dl><dt>时间：</dt><dd><input type="text" name="row[<?= $i ?>][credit][occurtime]" id="credit_datepicker<?= $i ?>" class="input datepicker" value="<?= date("Y-m-d") ?>" title="点击选择日期" size="10" style="width:100px;" datatype="*" readonly="true" errormsg=" " autocomplete="off" /></dd></dl>
                    <dl><dt>账户：</dt>
                        <dd>
                            <select name="row[<?= $i ?>][credit][account_id]" id="account_id_credit<?= $i ?>" datatype="*,notequal" notequal="inaccount_id_credit<?= $i ?>" class="select" errormsg=" " nullmsg=" ">
                                <?= get_account_option(); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>信用卡:</dt>
                        <dd>
                            <select name="row[<?= $i ?>][credit][inaccount_id]" id="inaccount_id_credit<?= $i ?>" datatype="*,notequal" notequal="account_id_credit<?= $i ?>" class="select" errormsg=" " nullmsg=" ">
                                <?= get_account_option('credit'); ?>
                            </select>
                        </dd></dl>
                    <dl><dt>金额：</dt><dd><input type="text" name="row[<?= $i ?>][credit][amount]" id="credit_calculator<?= $i ?>" class="input calculator" size="5" maxlength="8" datatype="dec1" nullmsg=" " errormsg=" " /></dd></dl>
                    <dl><dt>说明：</dt><dd><textarea name="row[<?= $i ?>][credit][memo]" cols="30" rows="4" class="textarea"></textarea></dd></dl>
                    <dl><dd><input type="checkbox" name="row[<?= $i ?>][credit][notinfamily]" value="1" id="c_notinfamily_credit<?= $i ?>" class="checkbox" /> <label for="c_notinfamily_credit<?= $i ?>">不在家庭中显示</label></dd></dl>
                </div>
            </div>
        <?php } ?>
        <dl class="clear" style="padding-top:0;">
            <dd style="margin-bottom:5px;"><input type="checkbox" name="continue" value="1" id="c_continue_expense" class="checkbox" checked /> <label for="c_continue_expense">保存后继续添加</label> </dd>
            <dd>
                <a href="javascript:;" class="btn btn_s submit"><span><b class="icon icon-ok"></b><em>提交</em></span></a>
                <a href="javascript:;" class="btn btn_w_s cancel"><span><b class="icon icon-remove"></b><em>取消</em></span></a>
                <span class="poststate"><em>&nbsp;</em><b></b></span>
            </dd>
        </dl>
    </form>
</div>
<script type="text/javascript">
    KS.common.load('bill.multi');
</script>